//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { OperateLog, OperateLogResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooOperateLogList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<OperateLogResponse>(`/uctoo/operate_log/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooOperateLog = async (id: string) => {
  return requestClient.get<OperateLog>(`/uctoo/operate_log/${id}`);
};

export const adductooOperateLog = async (data: Partial<OperateLog>) => {
  return requestClient.post<OperateLog>('/uctoo/operate_log/add', data);
};

export const edituctooOperateLog = async (data: Partial<OperateLog>) => {
  return requestClient.post<OperateLog>('/uctoo/operate_log/edit', data);
};

export const deleteuctooOperateLog = async (id: string) => {
  return requestClient.post<any>('/uctoo/operate_log/del', { id });
};
